#include <stdio.h>
#include <stdlib.h>
int main()
{
	FILE *fp;
	char ch[80],*p=ch;
	int n;
	if((fp=fopen("test2.txt","w"))==NULL)
	{
		printf("Can not open file");
		exit(0);
	}
	printf("Input 5 strings:\n");
	for(n=1;n<=5;n++)
	{
		gets(p);
		fputs(p,fp);
		fputc('\n',fp);
	}
	fclose(fp);
	return 0;
}